
import Vue from 'vue'
import * as types from '../mutation-types/userInfo'

const state = {
  loginInfo: null,
  userToken: '',
  code: ''
};

const mutations = {
  [types.USERINFO_SAVE_CODE] (state, { code }) {
    state.code = code;
  },
  [types.USERINFO_SAVE_LOGININFO] (state, { loginInfo }) {
    state.loginInfo = loginInfo;
  },
  [types.USERINFO_SAVE_USERTOKEN] (state, { userToken }) {
    state.userToken = userToken;
  },

};

export default {
  state,
  mutations
}

